﻿using System.Collections.Generic;
using System.Linq;
using Omnia.Enums;

namespace Omnia.DataModels
{
    public class TransactionStatisticInfo
    {
        public TransactionStatisticInfo() { }

        public TransactionStatisticInfo(double amount, int dayOrMonth)
        {
            Amount = amount;
            DayOrMonth = dayOrMonth;
        }

        public TransactionStatisticInfo(IEnumerable<TransactionInfo> trans, int dayOrMonth)
        {
            Amount = trans.Sum(t => t.Amount);
            DayOrMonth = dayOrMonth;
        }

        public double Amount { get; set; }

        public int DayOrMonth { get; set; }
    }
}
